/*
 * @Date: 2021-12-09 19:58:51
 * @LastEditors: LeeKing
 * @LastEditTime: 2021-12-09 20:19:39
 * @FilePath: \demo\src\store\modules\FavoriteList.js
 */
import { setUserFavorite } from '@/api/user.js'

const state = {
  FavoriteList: []
}
const mutations = {
  setFavoriteList (state, payload) {
    state.FavoriteList = payload
  }
}
const actions = {
  async  getFavorite (context) {
    const res = await setUserFavorite()
    console.log(res)
    context.commit('setFavoriteList', res.data.body)
  }
}
const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
